This invention relates to data storage systems, and in particular, to initializing selected extents of a mass-storage device.
A data storage system typically includes a large number of mass-storage devices, usually disks, for storage of data. Each device includes a contiguous sequence of blocks and tracks, sometimes referred to as an xe2x80x9cextent,xe2x80x9d that carries information identifying that device to the data storage system. This extent is said to be holding the label identifying that device to the data storage system. To avoid sowing confusion, it is important that no two devices on the data storage system share the same label.
Although hardware failure occurs only rarely, it is nevertheless desirable to maintain, on a second device, a copy of data stored on a first device. This second device, which is sometimes referred to as a xe2x80x9cbusiness continuation volumexe2x80x9d, is intended to be identical to the first device. This means that the second device has the same label as the first device. To avoid any confusion arising from the presence of two devices having the same label, a device-management utility executing on the data storage system sets a flag indicating that the second device is a mirror of the first device.
At some point, it may no longer be necessary to maintain copies of data from the first device on the second device. When this point is reached, the device management utility breaks the link between the first and second devices. This includes clearing the flag that designates the second device as a mirror. To avoid confusion arising from two devices having the same label, the device management utility also initializes the second device""s label so that it is no longer identical to that of the first device. This typically includes overwriting the extent on the second device that includes the label.
In most cases, the label occupies a small enough extent on the device so that the process of overwriting it consumes a negligible amount of time. However, certain software applications, particularly database applications, have labels that occupy very large extents on the storage device. The process of initializing these extents, which can be as large as several megabytes, consumes enough time to introduce a noticeable latency during the process of breaking the link between the first and second devices.
The invention provides a system and method for initializing large portions, or extents, of a mass-storage device in the background so that such overwriting processes do not significantly affect latency as experienced by a host. The method extends the use a system intended for background copying of data from a source extent to a destination extent to that of initializing an extent on a mass-storage device. It does so by causing the system to treat the defined extent as both a source extent and as a destination extent simultaneously.
In one practice of the invention, initializing an extent having at least one track includes preserving data in the track from being overwritten, indicating that the data in the track is to be replaced, and associating with the track an initialization code indicating the track is to be initialized.
Preserving the data in the track can include modifying a protection word corresponding to the track, for example, by selecting a protection bit in the protection word and modifying the selected protection bit.
Associating an initializing code can include inserting, at a selected location in a session table, the initializing code. In this practice of the invention, preserving data in the track can include selecting a protection bit in a protection word to correspond to the selected location in the session table and modifying that selected protection bit
Associating an initialization code with the track can also include providing the initial code at two or more independent locations associated with the track. This provides a basis for cross-checking the initializing code, thereby reducing the possibility of erroneously initializing a track.
In another practice of the invention, a track having data preserved from being overwritten is identified and an association between that track and an initializing code is determined. Following this, the track is then initialized.
Identifying a track having data preserved from being overwritten can include identifying a track having an associated protection word that is modified to indicate that data in the track is preserved from being overwritten.
To reduce the likelihood that tracks will be erroneously initialized, an optional practice of the invention includes confirming that the track has associated with it one, and optionally more than one indicator to indicate that data in the track is to be replaced.
In another practice of the invention, the consummation of the initialization process is triggered by an attempted read/write operation in a track. In the process, information associated with the track is detected. This information indicates that data in that track is to be replaced. An initializing code associated with the track is then identified and the track is then initialized.
The method of the invention is described in the context of initializing a label on a storage device. However, the invention is applicable to initializing any extent on a storage device, regardless of the purpose of the data contained in that extent.